package com.shensi.api.admin.client.station;

import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.station.dto.AutoPayWayDto;
import com.shensi.api.admin.domian.station.dto.PayWayDto;
import com.shensi.api.admin.domian.station.dto.PayWayStationBetweenDto;
import com.shensi.api.admin.domian.station.vo.AutoPayWayInfoVo;
import com.shensi.common.core.annotation.Log;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.enums.BusinessType;
import com.shensi.common.core.page.TableDataInfo;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.SHENSI_ADMIN_COLLECT,
        fallbackFactory = SysLogininforClientFallBack.class)
@Component
public interface PayWayClient {


    /**
     * 查询油站信息列表
     */
    @GetMapping("/payWay/info/list")
    public TableDataInfo list(@SpringQueryMap PayWayDto payWay);

    /**
     * 切换支付渠道列表
     */
    @GetMapping("/payWay/info/autoPayWayList")
    public TableDataInfo autoPayWayList(@SpringQueryMap AutoPayWayDto autoPayWayDto);

    @PostMapping("/payWay/info/setAutoPayWay")
    public AjaxResult setAutoPayWay(@RequestBody AutoPayWayDto autoPayWayDto) throws Exception;

    @PostMapping("/payWay/info/deleteAutoPayWay")
    public AjaxResult deleteAutoPayWay(Long id) throws Exception;

    @PostMapping("/payWay/info/getAutoPayWayInfo")
    public List<AutoPayWayInfoVo> getAutoPayWayInfo(Long id) throws Exception;
    @GetMapping(path = {"/payWay/info/selectAutoPayWay"})
    public void selectAutoPayWay(@RequestParam("wayPayWay") String wayPayWay,
                                 @RequestParam("stationId") Long stationId,
                                 @RequestParam("oilGun") String oilGun);


    @PostMapping("/payWay/info/editAutoPayWay")
    public AjaxResult editAutoPayWay(@RequestBody AutoPayWayDto autoPayWayDto);

    /**
     * 新增支付方式
     */
    @PostMapping("/payWay/info")
    public AjaxResult add(@RequestBody PayWayDto payWay);

    /**
     * 获取油站信息详细信息
     */
    @GetMapping(value = "/payWay/info/{payWayId}")
    public AjaxResult getInfo(@PathVariable("payWayId") Long payWayId);

    /**
     * 修改油站信息
     */
    @PutMapping("/payWay/info")
    public AjaxResult edit(@RequestBody PayWayDto payWay);
}
